package com.aleven.lease.web.app.service.impl;

import com.aleven.lease.web.app.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class SmsServiceImpl implements SmsService {
    @Autowired
    private RestTemplate restTemplate;
    
    @Override
    public void sendCode(String phone, String code) {
        String url = "https://push.spug.cc/send/k2RVBmyzEpj0ny3b?name=尚庭公寓&code="+code+"&targets="+phone;
        restTemplate.getForObject(url, String.class);
    }
}